<?php
require_once("lib/db_connection.php");
$region_id = $_GET['region'];
$result_province = mysql_query("select * from lookup_province where region_id='" . $region_id . "'");
$str_value = "";


while($row_province = mysql_fetch_array($result_province))
{
	$str_value=$str_value."Array(\"$row_province[province]\",\"$row_province[id]\")".",";
}


$str_value=substr($str_value,0,(strLen($str_value)-1)); // Removing the last char , from the string
echo "new Array($str_value)";
?>